FROM index.alauda.cn/tutum/ubuntu
MAINTAINER kalosmark

# Install squid packages

ADD sources.list /etc/apt/sources.list

RUN apt-get update && \
    apt-get -y install vim && \
    apt-get -y install build-essential libncurses5-dev cmake && \
    apt-get -y install build-essential openssl libssl0.9.8 libssl-dev && \
    wget http://ftp.nluug.nl/pub/networking/stunnel/archive/5.x/stunnel-5.28.tar.gz && \
    tar zxvf stunnel-5.28.tar.gz && \
    cd  stunnel-5.28 && \
    ./configure && \
    make && make install

ADD stunnel.pem /usr/local/etc/stunnel/stunnel.pem

ADD stunnel.conf /usr/local/etc/stunnel/stunnel.conf

ADD run.sh /run.sh

RUN chmod 755 /run.sh

EXPOSE 7375

CMD ["/run.sh"]